﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_ChiTietLienHe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {


            GioiThieuDataSet gioithieuds = new GioiThieuDataSet();
            GioiThieuHelper gioithieuhelper = new GioiThieuHelper();
            gioithieuds = gioithieuhelper.LoadGioiThieuViTri("LienHe");

            lblViTri.Text = "Liên hệ";
            if (!gioithieuds.GioiThieu[0].IsNoiDungNull()) txtTongQuan.Text = gioithieuds.GioiThieu[0].NoiDung;

            Session[this.Request.Url.AbsolutePath.ToString() + "_" + "Data"] = gioithieuds;
        }
    }
    protected void btnOK_OnClick(object sender, EventArgs e)
    {
        GioiThieuDataSet gioithieuds = (GioiThieuDataSet)Session[this.Request.Url.AbsolutePath.ToString() + "_" + "Data"];
        GioiThieuDataSet.GioiThieuRow row = gioithieuds.GioiThieu[0];

        row.NoiDung = txtTongQuan.Text;

        new GioiThieuHelper().SaveGioiThieu(gioithieuds);
    }
}